<?php

class OOWP_Atom_PostDate
    extends OOWP_Formattable
{

    public function __construct(array $args = array( ))
    {
        $input = array_merge(array(
            'formatting' => 'Posted on %s',
        ), $args);

        parent::__construct($input);
    }

    protected function getFormatting( )
    {
        return $this->dict['formatting'];
    }

    protected function setFormatting($format)
    {
        $this->dict['formatting'] = $format;
    }

    protected function getFormatPieces( )
    {
        $post = $this->governor->post;
        $post_date = get_the_time(get_option('date_format'), $post->ID);
        $result = sprintf($this->formatting, $post_date);
        return array($result );
    }

}
